#ifndef _FPS_COUNTER_H_
#define _FPS_COUNTER_H_

/**
* @brief
* Class that counts frames per seconds.
* In order to use this class, you have to make sure to call Update() method every frame
*/
class FpsCounter
{
	public:

		/**
		* @brief				Constructor of FpsCoutner class 
		* @param updateInterval	Indicatts how frequent you want to update FPS in seconds. 
		*						Default value is 1.0f (1 second)
		*/
		FpsCounter( float updateInterval = 1.0f );

	public:

		/**
		* @brief	Get current number of frames per seconds 
		* @return	Returns number of frames per seconds
		*/
		float GetFps( void ) const { return m_fps; }

	public:

		/**
		* @brief	Updates FpsCounter. Ensure to call this method every frame to calculate fps 
		*/
		void Update( float delta );

	private:
		
		float m_fps;
		float m_timeSinceLastUpdate;
		float m_fpsUpdateInterval;
		unsigned int m_numberOfFrames;
};

#endif // end of _FPS_COUNTER_H_